<!DOCTYPE html>
<html lang="zh-CN" >
<head>
    <meta charset="UTF-8">
    <title>大方漆器</title>
    <!--  窗口图标-->
    <link rel="shortcut icon " href="img/logo.jpg">
    <link rel="stylesheet" href="qiqi.css">

    <link rel="stylesheet" href="iconfont/iconfont.css">
</head>
<body>

<div class="nav" >

    <div class="navtop">
        <ul>
            <li id="#top"><img src="images/denglu.png" ><a href="denglu.html"><b>登录  </b></a></li>
            <li>|</li>
            <li><img src="images/zhuce.png" > <a href="zhuce.html"><b>注册  </b></a></li>
            <li>|</li>
            <li> <img src="images/gouwuche_top.png" alt="购物车"><a href=""><b>购物车  </b></a></li>
            <li>|</li>
            <li><img src="images/shoucang.png" alt="收藏夹"><a href="#"><b>收藏夹  </b></a> </li>
            <li>|</li>
            <li><img src="images/wodekefu.png" ><a href="#"><b>联系客服</b></a></li>
        </ul>
    </div>

</div>
<div class="navbottom">
    <div class="logo">
        <a href="" >  <img src="img/logo.jpg" height="80px" alt="logo"></a></div>
    <div class="logo-font">  <p><b>大方漆器</b></p>
</div>
    <div class="sh">
        <div>
            <label>
                <input class="sh_inp" type="text" placeholder="搜索漆器">
                <a href="#"><img src="images/sousuo.png" height="30px" alt="搜索"></a></label>
        </div>
    </div>
</div>
<div class="side-bar">
    <ul>
        <li><a href="www.baidu.com"><span class="iconfont icon-gerenzhongxin"> </span><p>个人中心</p></a>
        </li>

        <li><a href="#"> <span class="iconfont icon-rengongfuwu"> </span><p>人工客服</p></a></li>
        <li><a href="#"> <span class="iconfont icon-gouwucheman"> </span><p>购物车</p></a></li>
        <li><a href="#"> <span class="iconfont icon-shouhou"> </span><p>售后服务</p></a></li>
        <li><a href="#top"> <span class="iconfont icon-ai-top"> </span><p>回到顶部</p></a></li>

    </ul>
</div>


<div class="shell">
    <div class="exbox">
        <div class="images">
            <img src="img/bitong.png">
        </div>
        <div class="content">
            <p>漆器笔筒</p>

        </div>
    </div>
    <div class="exbox">
        <div class="images">
            <img src="img/shouzhuo4.jpg">
        </div>
        <div class="content">
            <p>手镯</p>

        </div>
    </div>
    <div class="exbox">
        <div class="images">
            <img src="img/shouzhuo5.jpg">
        </div>
        <div class="content">
            <p>手镯</p>

        </div>
    </div>
    <div class="exbox">
        <div class="images">
            <img src="img/fazan.jpg">
        </div>
        <div class="content">
            <p>发簪</p>

        </div>
    </div>
    <div class="exbox">
        <div class="images">
            <img src="img/shoujike(1)(1).png">
        </div>
        <div class="content">
            <p>漆器手机壳</p>

        </div>
    </div>
</div>
<div class="product clearfix">
    <div class="p1">
        <div class="p1-1">
            <div><img src="img/qipan.png"></div>
            <div class="title"><b>漆盘</b></div>
            <div class="price"><b>29￥</b></div>
        </div>
        <div class="p1-1">  <div><img src="img/shuzi.png"></div>
            <div class="title"><b>漆梳</b></div>
            <div class="price">29￥</div></div>
        <div class="p1-1">  <div><img src="img/erhuan.jpg"></div>
            <div class="title"><b>漆器耳环</b></div>
            <div class="price">58￥</div></div>
    </div>
    <div class="p2">
        <div class="p2-1">
            <div><img src="img/shouzhuo4.jpg"></div>
            <div class="title"><b>手镯</b></div>
            <div class="price">269￥</div>
        </div>
        <div class="p2-1">  <div><img src="img/shouzhuo5.jpg"></div>
            <div class="title"><b>手镯</b></div>
            <div class="price">269￥</div></div>
        <div class="p2-1">  <div><img src="img/shouzhuo3.jpg"></div>
            <div class="title"><b>手镯</b></div>
            <div class="price">269￥</div></div>
        <div class="p2-1">  <div><img src="img/qishao.png"></div>
            <div class="title"><b>漆勺</b></div>
            <div class="price">18￥</div></div>
    </div>
    <div class="p3">
        <div class="p3-1">
            <div><img src="img/jiuhu.png"></div>
            <div class="title"><b>漆器酒壶</b></div>
            <div class="price">128￥</div>
        </div>
        <div class="p3-1">  <div><img src="img/liwuhe.png"></div>
            <div class="title"><b>漆器礼物盒</b></div>
            <div class="price">69￥</div></div>
    </div>
    <div class="p2">
        <div class="p2-1">
            <div><img src="img/shouzhuo1.jpg"></div>
            <div class="title"><b>手镯</b></div>
            <div class="price">269￥</div>
        </div>
        <div class="p2-1">  <div><img src="img/shouzhuo2.jpg"></div>
            <div class="title"><b>手镯</b></div>
            <div class="price">269￥</div></div>
        <div class="p2-1">  <div><img src="img/shouchuan.jpg"></div>
            <div class="title"><b>手串</b></div>
            <div class="price">128￥</div></div>
        <div class="p2-1">  <div><img src="img/shoujike.jpg"></div>
            <div class="title"><b>漆器手机壳</b></div>
            <div class="price">49￥</div></div>
    </div>

    <div class="p4">
        <div class="p4-1"><div><img src="img/wan.png"></div>
            <div class="title"><b>漆碗</b></div>
            <div class="price">39￥</div></div>
        <div class="p4-2"><div><img src="img/fazan.jpg"></div>
            <div class="title"><b>发簪</b></div>
            <div class="price">58￥</div></div>
        <div class="p4-2"><div><img src="img/bitong.png"></div>
            <div class="title"><b>漆器笔筒</b></div>
            <div class="price">39￥</div></div>
    </div>
    <div class="p4">
        <div class="p4-2"><div><img src="img/beizi.png"></div>
            <div class="title"><b>漆杯</b></div>
            <div class="price">29￥</div></div>
        <div class="p4-2"><div><img src="img/diaopai.png"></div>
            <div class="title"><b>吊牌/挂坠</b></div>
            <div class="price">28￥</div></div>
        <div class="p4-1">  <div><img src="img/faquan.jpg"></div>
            <div class="title"><b>发圈</b></div>
            <div class="price">6￥</div></div>
    </div>
    <div class="p4">
        <div class="p4-1">  <div><img src="img/jiezhi.png"></div>
            <div class="title"><b>戒指</b></div>
            <div class="price">99￥</div></div>
        <div class="p4-2"><div><img src="img/shouzhuo6.jpg"></div>
            <div class="title"><b>手镯</b></div>
            <div class="price">269￥</div></div>
        <div class="p4-2"><div><img src="img/qijing.jpg"></div>
            <div class="title"><b>漆镜</b></div>
            <div class="price">288￥</div></div>
    </div>
</div>

<div class="footer">
    <div class=" foot-top">

        <div class="top1">
            <ul>

                <li><a>关于我们</a></li>
                <li><a>服务中心</a></li>
                <li><a>用户协议</a></li>
                <li><a>联系我们</a></li>
                <li><a>关注我们</a></li>
                <li><a>售后服务</a></li>
            </ul>


        </div>
    </div>
</div>

<script>
    window.onload=function(){
        var imgList = document.querySelectorAll(".imgList>a");
        var btnList = document.querySelectorAll(".box>.btn>span");
        var lbtn = document.querySelector(".leftBtn");
        var rbtn = document.querySelector(".rightBtn");
        var time = 3000;
        var index = 0;
        var dingshiqi;
        start();
        function start(){
            dingshiqi = setInterval(function(){
                index==imgList.length - 1 ? index=0 : index++;
                switchPublic();
            },time)
        }
        function switchPublic(){
            for(var i =0;i<imgList.length;i++){
                imgList[i].classList.remove('showImg')
                btnList[i].classList.remove('checked')
            }
            imgList[index].classList.add('showImg')
            btnList[index].classList.add('checked')
        }
        lbtn.onclick=function(){
            clearInterval(dingshiqi)
            index==0 ? index = imgList.length - 1 : index--;
            switchPublic();
            start();
        }
        rbtn.onclick=function(){
            clearInterval(dingshiqi)
            index == imgList.length - 1 ? index = 0 : index ++;
            switchPublic();
            start();
        }
        for(let i = 0;i<btnList.length;i++){
            btnList[i].onclick=function(){
                clearInterval(dingshiqi)
                index = i;
                switchPublic();
                start();
            }
        }
    }
</script>

</body>
</html>
